Image encoding method/device, image decoding method/device and recording medium having bitstream stored therein

ABSTRACT

The present invention provides an image encoding method and an image decoding method. The image decoding method, according to the present invention, comprises the steps of: determining a transformation performing region; segmenting the determined transformation performing region into at least one sub-transform block by using at least one of quadtree segmentation and binary tree segmentation; and performing inverse transformation on the at least one sub-transform block.

TECHNICAL FIELD

The present invention relates to an image encoding/decoding method andapparatus. More particularly, the present invention relates to an imageencoding method and an image decoding method, the methods being capableof adaptively determining a secondary transform performing area, and apartition shape of a sub transform block of the corresponding area.

BACKGROUND ART

In recent years, demand for multimedia data such as video has beenrapidly increasing on the Internet. However, it is hard for developmentof technology for improving channel bandwidths to keep up with the rapidchanges in the demand for multimedia data. In order to solve thisproblem, VCEG (video coding expert group) of ITU-T which is the internalorganization for standards and MPEG (moving picture expert group) ofISO/IEC are continuously collaborating to establish improved videocompression standards.

Video compression consists largely of intra prediction, interprediction, transform, quantization, entropy coding, and in-loopfiltering. Among them, intra prediction is a technique of generating aprediction block for a current block by using reconstructed pixelsexisting around the current block.

Conventional image encoding/decoding methods and apparatuses have theirlimitation in improving coding efficiency because the conventionalmethods and apparatuses perform transform without determining aperforming area separately.

DISCLOSURE Technical Problem

An objective of the present invention is to provide an imageencoding/decoding method and apparatus, wherein compression efficiencyis improved.

In addition, the present invention provides an image encoding/decodingmethod and apparatus, the method and apparatus being capable ofadaptively determining a transform performing area in a transform block,and a partition shape of a sub transform block within the transformperforming area so as to improve image encoding/decoding efficiency.

In addition, the present invention provides an image encoding/decodingmethod and apparatus, the method and apparatus being capable ofadaptively determining a scan method of a sub transform block within asub transform block within a transform performing area so as to improveimage encoding/decoding efficiency.

Technical Solution

According to an embodiment of the present invention, a method ofdecoding an image includes: determining a transform performing;partitioning the determined transform performing area in to at least onesub transform block by using at least one of a QT partition and a BTpartition; and performing inverse-transform for the at least one subtransform block.

In the image decoding method, in the determining of the transformperforming area, the transform performing area may be determined on thebasis of an intra-prediction mode of a current prediction block inassociation with a current transform block.

In the image decoding method, in the determining of the transformperforming area, when the intra-prediction mode of the currentprediction block is a horizontal directional prediction mode, a leftarea of the current transform block may be determined as the transformperforming area, when the intra-prediction mode of the currentprediction block is a vertical directional prediction mode, an upperarea of the current transform block may be determined as the transformperforming area, and when the intra-prediction mode of the currentprediction block is not a horizontal directional prediction mode, nor avertical directional prediction mode, a left upper area of the currenttransform block may be determined as the transform performing area.

In the image decoding method, in the determining of the transformperforming area, the transform performing area may be determined on thebasis of a specific frequency area of a current transform block.

In the image decoding method, the specific frequency area may bedetermined on the basis of a predefined value.

In the image decoding method, the inverse-transform may be any one ofprimary inverse-transform and secondary inverse-transform.

In the image decoding method, the at least one sub transform block maybe a 2D sub transform block.

In the image decoding method, the method may further include:determining a coefficient scan method of the sub transform block; andresorting the 2D sub transform block on the basis of the determinedcoefficient scan method.

In the image decoding method, in the determining of the coefficient scanmethod of the sub transform block, the coefficient scan method of thesub transform block may be determined on the basis of at least one of anintra-prediction mode of a current prediction block in association witha current transform block, and a transform base of the current transformblock.

In the image decoding method, in the determining of the coefficient scanmethod of the sub transform block, any one of a vertical directionalscan, a horizontal directional scan, and a 45-degree diagonaldirectional scan may be determined as the scan method.

In the image decoding method, in the resorting of the 2D sub transformblock on the basis of the determined coefficient scan method, the 2D subtransform block may be resorted to a 1D sub transform block on the basisof the determined coefficient scan method.

According to an embodiment of the present invention, an image encodingmethod includes: determining a transform performing area; partitioningthe determined transform performing area into at least one sub transformblock by using at least one of a QT partition and a BT partition; andperforming transform for the at least one sub transform block.

In the image encoding method, in the determining of the transformperforming area, the transform performing area may be determined on thebasis of an intra-prediction mode of a current prediction block inassociation with a current transform block.

In the image encoding method, in the determining of the transformperforming area, when the intra-prediction mode of the currentprediction block is a horizontal directional prediction mode, a leftarea of the current transform block may be determined as the transformperforming area, when the intra-prediction mode of the currentprediction block is a vertical directional prediction mode, an upperarea of the current transform block may be determined as the transformperforming area, and when the intra-prediction mode of the currentprediction block is not a horizontal directional prediction mode, nor avertical directional prediction mode, a left upper area of the currenttransform block may be determined as the transform performing area.

In the image encoding method, in the determining of the transformperforming area, the transform performing area may be determined on thebasis of a specific frequency area of a current transform block.

In the image encoding method, the specific frequency area may bedetermined on the basis of a predefined value.

In the image encoding method, the transform may be any one of primarytransform and secondary transform.

In the image encoding method, the at least one sub transform block maybe a 2D sub transform block.

In the image encoding method, the method further includes: determining acoefficient scan method of the sub transform block; and resorting the 2Dsub transform block on the basis of the determined coefficient scanmethod.

In the image encoding method, in the determining of the coefficient scanmethod of the sub transform block, the coefficient scan method of thesub transform block may be determined on the basis of at least one of anintra-prediction mode of a current prediction block in association witha current transform block, and a transform base of the current transformblock.

In the image encoding method, in the determining of the coefficient scanmethod of the sub transform block, any one of a vertical directionalscan, a horizontal directional scan, and a 45-degree diagonaldirectional scan may be determined as the scan method.

In the image encoding method, in the resorting of the 2D sub transformblock on the basis of the determined coefficient scan method, the 2D subtransform block may be resorted to a 1D sub transform block on the basisof the determined coefficient scan method.

According to the present invention, a computer readable recording mediumstores a bitstream, wherein the bitstream is generated by an imageencoding method including: determining a transform performing area;partitioning the determined transform performing area into at least onesub transform block by using at least one of a QT partition and a BTpartition; and performing transform for the at least one sub transformblock.

Advantageous Effects

According to the present invention, there is provided an imageencoding/decoding method and apparatus, wherein compression efficiencycan be improved.

In addition, according to the present invention, there is provided animage encoding/decoding method and apparatus, the method and apparatusbeing capable of adaptively determining a transform performing area in atransform block, and a partition shape of a sub transform block withinthe transform performing area so as to improve image encoding/decodingefficiency.

In addition, according to the present invention, there is provided animage encoding/decoding method and apparatus, the method and apparatusbeing capable of adaptively determining a scan method of a sub transformblock within a sub transform block within a transform performing area soas to improve image encoding/decoding efficiency.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram schematically showing an image encodingapparatus according to an embodiment of the present invention.

FIG. 2 is a block diagram schematically showing an image decodingapparatus according to an embodiment of the present invention.

FIG. 3 is a view of a flowchart showing a transform method of the imageencoding apparatus according to an embodiment of the present invention.

FIG. 4 is a view of a flowchart showing a transform method of the imagedecoding apparatus according to an embodiment of the present invention.

FIG. 5 is a view of a flowchart showing a method of determiningtransform performing area on the basis of an intra-prediction modeaccording to an embodiment of the present invention.

FIG. 6 is a view showing a horizontal directional prediction accordingto an embodiment of the present invention mode.

FIG. 7 is a view showing a vertical directional prediction modeaccording to an embodiment of the present invention.

FIG. 8 is a view showing a left area, an upper area, and a left upperarea within a current transform block according to an embodiment of thepresent invention.

FIG. 9 is a view of a flowchart showing a method of determining atransform performing area on the basis of a frequency area of atransform block according to an embodiment of the present invention.

FIG. 10 is a view showing an example of determining a transformperforming area on the basis of a frequency area of a transform block.

FIGS. 11 and 12 are views showing a quad tree (QT) partition of atransform block according to an embodiment of the present invention.

FIGS. 13 and 14 are views of flowcharts showing a BT partition of atransform block according to an embodiment of the present invention.

FIG. 15 is a view showing an example where a transform performing areais partitioned into transform blocks by using a QT partition and a BTpartition.

FIG. 16 is a view showing an example of a scanning method and aresorting method of a two-dimensional (2D) sub transform block whenconverting a 2D sub transform block to a one-dimensional (1D) subtransform block to perform a 1D transform method rather than a 2Dtransform method.

FIG. 17 is a view showing an example of a scanning method and aresorting method of a 2D sub transform block.

FIG. 18 is a view of a flowchart showing a method of determining a scanmethod of a sub transform block on the basis of a prediction mode of acurrent block according to an embodiment of the present invention.

FIG. 19 is a view showing a method of determining a scan method of a subtransform block on the basis of a transform base according to anembodiment of the present invention.

FIG. 20 is a view of a flowchart showing an image decoding methodaccording to an embodiment of the present invention.

MODE FOR INVENTION

A variety of modifications may be made to the present invention andthere are various embodiments of the present invention, examples ofwhich will now be provided with reference to drawings and described indetail. However, the present invention is not limited thereto, althoughthe exemplary embodiments can be construed as including allmodifications, equivalents, or substitutes in a technical concept and atechnical scope of the present invention. Referring to the drawings,similar reference numerals are used to refer to similar components.

Terms used in the specification, “first”, “second”, etc. can be used todescribe various components, but the components are not to be construedas being limited to the terms. The terms are only used to differentiateone component from other components. For example, the “first” componentmay be named the “second” component without departing from the scope ofthe present invention, and the “second” component may also be similarlynamed the “first” component. The term “and/or” includes a combination ofa plurality of items or any one of a plurality of terms.

It will be understood that when an element is simply referred to asbeing “connected to” or “coupled to” another element without being“directly connected to” or “directly coupled to” another element in thepresent description, it may be “directly connected to” or “directlycoupled to” another element or be connected to or coupled to anotherelement, having the other element intervening therebetween. In contrast,it should be understood that when an element is referred to as being“directly coupled” or “directly connected” to another element, there areno intervening elements present

The terms used in the present specification are merely used to describeparticular embodiments, and are not intended to limit the presentinvention. An expression used in the singular encompasses the expressionof the plural, unless it has a clearly different meaning in the context.In the present specification, it is to be understood that terms such as“including”, “having”, etc. are intended to indicate the existence ofthe features, numbers, steps, actions, elements, parts, or combinationsthereof disclosed in the specification, and are not intended to precludethe possibility that one or more other features, numbers, steps,actions, elements, parts, or combinations thereof may exist or may beadded. In other words, when a specific element is referred to as being“included”, elements other than the corresponding element are notexcluded, but additional elements may be included in embodiments of thepresent invention or the scope of the present invention

Hereinafter, embodiments of the present invention will be described indetail with reference to the accompanying drawings. The same constituentelements in the drawings are denoted by the same reference numerals, anda repeated description of the same elements will be omitted.

FIG. 1 is a block diagram showing an image encoding apparatus accordingto an embodiment of the present invention.

Referring to FIG. 1, the encoding apparatus 100 may include an imagepartition unit 101, an intra-prediction unit 102, an inter-predictionunit 103, a subtractor 104, a transform unit 105, a quantization unit106, an entropy encoding unit 107, a dequantization 108, aninverse-transform unit 109, an adder 110, a filter unit 111, and amemory 112.

Each component shown in FIG. 1 is shown independently to representdifferent characteristic functions in the image encoding apparatus, anddo not mean that each component is necessarily configured separately ina hardware or software unit. That is, each component is separatelydescribed for the convenience of description. At least two componentsmay be incorporated into a single component or one component may bedivided into a plurality of components. An embodiment in whichcomponents are incorporated into a single component or one component maybe divided into a plurality of components also falls within the scope ofthe present invention.

Furthermore, some elements may not serve as necessary elements toperform an essential function in the present invention, but may serve asselective elements to improve performance. The present invention may beembodied by including only necessary elements to implement the spirit ofthe present invention excluding elements used to improve performance,and a structure including only necessary elements excluding selectiveelements used to improve performance is also included in the scope ofthe present invention.

The image partition unit 101 may perform partition for an input imageinto at least one block. Herein, the input image may have various shapesand sizes such as picture, slice, tile, segment, etc. The block may meana coding unit (CU), a prediction unit (PU) or a transform unit (TU).

The image partition unit 101 may perform partition from a coding unit ofa maximum size (hereinafter, referred as maximum coding block) to acoding unit of a minimum size (hereinafter, referred as minimum codingblock). The partition may be performed on the basis of at least one of aquad tree (QT) and a binary tree (BT). A QT is a method of partitioningan upper layer block into four lower layer blocks having a width and aheight to be half of the upper layer block. A BT is a method ofpartitioning an upper layer block into two lower layer blocks having awidth or height to be a half of the upper layer block. Through partitionbased on a BT, a block may have a square shape as well as a non-squareshape.

Hereinafter, in an embodiment of the present invention, a coding unitmay be used as a meaning of a unit of performing encoding, or may meanas a meaning of a unit of performing decoding. In addition, the codingunit may mean a coding block.

The prediction units 102 and 103 may include an inter-prediction unit103 performing inter-prediction and an intra-prediction unit 102performing intra-prediction. The prediction units 102 and 103 maygenerate a prediction block by using a neighbor pixel of a block that iscurrently predicted (hereinafter, referred as prediction block) in acurrent original block, or by using a reference picture that has beenalready decoded. Herein, at least one prediction block may be generatedwithin a coding lock. When a prediction block within a coding block isone, the prediction block may have a shape identical to the codingblock.

A method of predicting a video signal mainly consists intra-predictionand inter-prediction. Intra-prediction is a method of generating aprediction block by using neighbor pixels of a current block, andinter-prediction is a method of generating a prediction block bysearching for a block that is closest to a current block in a referencepicture that has been already encoded and decoded.

The prediction units 102 and 103 may determine an optimized predictionmode of a prediction block by performing various methods such asrate-distortion optimization (RDO) for a residue block obtained bysubtracting a prediction block from a current original block. An RDOformula may be as Formula 1 below.

J(Ø,λ)=D(Ø)+λR(Ø)  [Formula 1]

Herein, D may be degradation by quantization, R may be a rate of acompression stream, J may be an RD cost, Φ may be a coding mode, and λmay be a Lagranginan multiplier and a scaling correcting coefficient toreconcile between error quantities.

A residue value (residue block) between a generated prediction block andan original block may be input to the transform unit 105. In addition,prediction mode information used for prediction, and motion vectorinformation may be encoded in the entropy encoding unit 107 with theresidue value and transmitted to the decoder. When a specific codingmode is used, the prediction block may not be generated through theprediction units 102 and 103, and the original block may be possiblyencoded as it is and transmitted to the decoding unit.

The intra-prediction unit 102 may generate a prediction block on thebasis of reference pixel information adjacent to a current block whichis pixel information of a current picture. When a prediction mode of aneighbor block of a current block for which intra-prediction will beperformed is inter-prediction, a reference pixel included in a neighborblock to which inter-prediction is applied may be replaced with areference pixel within another neighbor block for which intra-predictionis applied. In other words, when a reference pixel is not available,non-available reference pixel information may be used by replacing thesame with at least one available reference pixel.

In intra-prediction, a prediction mode may have a directional predictionmode using reference pixel information according to a predictiondirection, and a non-directional mode not using directional informationwhen performing prediction. A mode for predicting luma information and amode for predicting chroma information may be different,intra-prediction mode information or predicted luma signal informationused for predicting the luma information may be used for predicting thechroma information.

The inter-prediction unit 103 may generate a prediction block on thebasis of information of at least one picture among pictures before orafter a current picture. In some cases, a prediction block may begenerated on the basis of information of a partial area within thecurrent picture which has been already encoded. The inter-predictionunit 103 may include a reference picture interpolation unit, a motionestimation unit, and a motion compensation unit.

The subtractor 104 may generate a residue block of a current block bysubtracting a prediction block generated in the intra-prediction unit102 or inter-prediction unit 103 from a currently encoded block.

The transform unit 105 may generate a transform block by applying atransform method such as DCT, DST, KLT (Karhunen Loeve Transform), etc.to a residue block including residue data. The transform block may be aunit used for transform and quantization. Transform may be performed forthe entire residue block, or transform may be performed by partitioningthe residue block by a sub-block unit. Herein, as a partition method ofa transform block, a partition method based on a QT or a BT may be used.

Meanwhile, a transform method may be determined on the basis of anintra-prediction mode of a prediction block used for generating aresidue block. For example, according to an intra-prediction mode, DCTmay be used for a horizontal direction, and DST may be used for avertical direction.

The quantization unit 106 may generate a quantized transform block byperforming quantization for transform blocks transformed in a frequencyarea in the transform unit 105. A quantization coefficient may varyaccording to a block or image importance degree.

The quantization unit 106 may generate and output a quantized transformblock having a quantized coefficient (quantized transform coefficient)by performing quantization for transform coefficients of a transformblock generated in the transform unit 105. Herein, as a quantizationmethod, dead zone uniform threshold quantization (DZUTQ) or quantizationweighted matrix, etc. may be used.

A value calculated in the quantization unit 106 may be provided to thedequantization unit 108 and the entropy encoding unit 107.

The at least one of the transform unit 105 and the quantization unit 106may be selectively included in the image encoding apparatus 100. Inother words, the image encoding apparatus 100 may perform at least oneof transform and quantization for residue data of a residue block, orencode a residue block by skipping transform and quantization. When anyone of transform an quantization is not performed, or both of transformand quantization are not performed in the image encoding apparatus 100,a block input to the entropy encoding unit 107 is typically called atransform block.

The entropy encoding unit 107 entropy encodes input data. Entropyencoding, may use, various encoding methods, for example, exponentialGolomb, context-adaptive variable length coding (CAVLC), andcontext-adaptive binary arithmetic coding (CABAL).

The entropy encoding unit 107 may encode various pieces of informationsuch as coefficient information of a residue value of a coding blockfrom the prediction units 102 and 103 and block type information of ablock, prediction mode information, partition block information,prediction block information and transmission unit information, motionvector information, reference frame information, interpolationinformation of a block, filtering information, etc. In the entropyencoding unit 107, a coefficient of a transform block may be encoded invarious types of flags representing a coefficient other than 0, acoefficient having an absolute value greater than 1 or 2, a coefficientsign, etc. in a partial block within the transform block. A coefficientthat is not encoded by the above flag may be encoded through an absolutevalue of a difference between the coefficient encoded by the flag and acoefficient of an actual transform block. The dequantization unit 108and the inverse-transform unit 109 may perform dequantization for valuesquantized in the quantization unit 106, and perform inverse-transformfor values transformed in the transform unit 105. A residue value(residual) generated in the dequantization unit 108 and theinverse-transform unit 109 may be used for generating a reconstructedblock by being added to a prediction block predicted through the motionestimation unit, and the motion compensation unit included in theprediction units 102 and 103, and the intra-prediction unit 102. Theadder 110 may generate a reconstructed block by adding the predictionblock generated in the prediction units 102 and 103, and the residueblock generated through the inverse-transform unit 109.

The filter unit 111 may include at least one of a deblocking filter, anoffset correction unit, and an adaptive loop filter (ALF).

A deblocking filter may remove a block distortion generated by aboundary between blocks within a reconstructed picture. In order todetermine whether or not to perform deblocking, whether or not to applya deblocking filter to a current block may be determined on the basis ofa pixel included in some rows or columns included in a block. When thedeblocking filter is applied to the block, a strong filter or a weakfilter may be applied according to deblocking filtering strength. Inaddition, when applying a deblocking filter and performing verticalfiltering and horizontal filtering, vertical directional filtering andhorizontal directional filtering may be performed in parallel.

The offset correction unit may correct an offset for an image for whichdeblocking is performed with an original image in a pixel unit. In orderto correct an offset for a specific picture, a method of dividing pixelsincluded in an image into a predetermined number of areas, determiningan area for which an offset will be applied, and applying an offset tothe corresponding area, or a method of applying an offset by taking intoaccount edge information of each pixel may be used.

ALF (adaptive loop filtering) may be performed on the basis of a valueobtained by comparing a reconstructed image for which filtering isapplied and an original image. Pixels included in an images may bedivided into predetermined groups, a single filter that will be appliedto each group may be determined, and thus filtering may be selectivelyapplied to each group. Information of whether or not to apply ALF may betransmitted for each coding unit (CU) for a luma signal, and a shape anda filter coefficient of an ALF filter which will be applied may varyaccording to each block. In addition, regardless of characteristic of ablock to which the filter will be applied, ALF having the same shape(fixed shape) may be applied.

The memory unit 112 may store a reconstructed block or picturecalculated in the filter unit 111, and the stored reconstructed block orpicture may be provided to the prediction units 102 and 103 whenperforming inter-prediction.

FIG. 2 is a block diagram showing image decoding apparatus 200 accordingto an embodiment of the present invention.

Referring to FIG. 2, the image decoding apparatus 200 may include anentropy decoding unit 201, a dequantization unit 202, aninverse-transform unit 203, an adder 204, a filter unit 205, a memory206, and prediction units 207 and 208.

When a bitstream generated in the image encoding apparatus 100 is inputto the image decoding apparatus 200, the input bitstream may be decodedaccording to the process opposite to that performed in the imageencoding apparatus 100.

The entropy decoding unit 201 may perform entropy decoding by theopposite process to that of the entropy encoding unit 107 of the imageencoding apparatus 100. For example, in association with a methodperformed in the image encoder, various methods may be applied such asexponential Golomb, context-adaptive variable length coding (CAVLC),context-adaptive binary arithmetic coding (CABA), etc. In the entropydecoding unit 201, a coefficient of a transform block may be decoded onthe basis of various types of flags representing a coefficient otherthan 0, a coefficient having an absolute value greater than 1 or 2, acoefficient sign, etc. in a partial block unit within the transformblock. A coefficient that is not represented by the above flag may bedecoded by adding the coefficient represented by the flag and a signaledcoefficient.

The entropy decoding unit 201 may decode information related tointra-prediction and inter-prediction which are performed in theencoder. The dequantization unit 202 may generate a transform block byperforming quantization for a quantized transform block. Thedequantization unit 202 operates identically with the dequantizationunit 108 of FIG. 1.

The inverse-transform unit 203 may generate a residue block byperforming inverse-transform for a transform block. Herein, a transformmethod may be determined on the basis of a prediction method (inter orintra-prediction), a size or shape or both of a block, and informationof an intra-prediction mode. The inverse-transform unit 203 operatessubstantially identically with the inverse-transform unit 109 of FIG. 1.

The adder 204 may generate a reconstructed block by adding a predictionblock generated in the intra-prediction unit 207 or inter-predictionunit 208 and a residue block generated through the inverse-transformunit 203. The adder 204 operates substantially identically with theadder 110 of FIG. 1.

The filter unit 205 decreases various types of noises occurring inreconstructed blocks. The filter unit 205 may include a deblockingfilter, an offset correction unit, and ALF.

When information of whether or not a deblocking filter is applied to acorresponding block or picture is provided and a deblocking filter isapplied, information of whether a strong filter is applied or a weakfilter is applied may be provided. The deblocking filter of the imagedecoding apparatus 200 may be provided with information related to adeblocking filter which is provided from the image encoding apparatus100, and the image decoding apparatus 200 may perform deblockingfiltering for the corresponding block.

The offset correction unit may perform offset correction for areconstructed image on the basis of information of an offset correctiontype, and an offset value which are applied to an image when performingencoding.

ALF may be applied to a coding unit on the basis of information ofwhether or not to apply ALF, ALF coefficient information, etc. which areprovided from the image encoding apparatus 100. Such ALF information maybe provided by being included in a specific parameter set. The filterunit 205 operates substantially identically with the filter unit 111 ofFIG. 1.

The memory 206 may store a reconstructed block generated by the adder204. The memory 206 operates substantially identically to the memoryunit 112 of FIG. 1.

The prediction units 207 and 208 may generate a prediction block on thebasis of information related to generating a prediction block providedfrom the entropy decoding unit 201, and a block that has been alreadydecoded or picture information which is provided in the memory 206.

The prediction units 207 and 208 may include an intra-prediction unit207 and an inter-prediction unit 208. Although not shown separately, theprediction units 207 and 208 may further include a prediction unitdetermining unit. The prediction unit determining unit may receivevarious pieces of information input from the entropy decoding unit 201such as prediction unit information, prediction mode information of anintra-prediction method, motion prediction related information of aninter-prediction method, etc., determine a prediction unit in a currentcoding unit, and determine whether inter-prediction is performed in theprediction unit or intra-prediction is performed in the prediction unit.The inter-prediction unit 208 may perform inter-prediction for a currentprediction unit by using information necessary for inter-prediction ofthe current prediction unit which is provided from the image encodingapparatus 100 on the basis of information included in at least onepicture among pictures before or after a current picture to which thecurrent prediction unit belongs. Alternatively, inter-prediction may beperformed on the basis of information of a partial area that has beenalready reconstructed within the current picture to which the currentprediction unit belongs.

In order to perform inter-prediction, which method among a skip mode, amerge mode, and an AMVP mode is used as a motion prediction method of aprediction block included in a corresponding coding block may bedetermined on the basis of the coding block.

The intra-prediction unit 207 may generate a prediction block by usingpixels that have been already reconstructed and which are locatedadjacent to a currently encoding block.

The intra-prediction unit 207 may include an adaptive intra smoothing(AIS) filter, a reference pixel interpolation unit, and a DC filter. TheAIS filter may be a filter performing filtering for a reference pixel ofa current block, and whether or not to apply a filter may be adaptivelydetermined according to a prediction mode of a current prediction block.AIS filtering may be performed for a reference pixel of a current blockby using a prediction mode of a prediction block, and AIS filterinformation which are provided from the image encoding apparatus 100.When the prediction mode of the current block is a mode not performingAIS filtering, an AIS filter may not be applied.

The reference pixel interpolation unit of the intra-prediction unit 207may generate a reference pixel at a location of a fractional unit byperforming interpolation for the reference pixel when a prediction modeof a prediction block is a prediction block performing intra-predictionon the basis of a pixel value obtained by performing interpolation forthe reference pixel. The generated reference pixel at the location ofthe fractional unit may be used as a prediction pixel of a pixel withina current block. When a prediction mode of a current prediction block isa prediction mode generating a prediction block without performinginterpolation for a reference pixel, interpolation for the referencepixel may not be performed. A DC filter may generate a prediction blockthrough filtering when a prediction mode of a current block is a DCmode.

The intra-prediction unit 207 operates substantially identically withthe intra-prediction unit 102 of FIG. 1.

The inter-prediction unit 208 generates an inter-prediction block byusing a reference picture, and motion information which are stored inthe memory 206. The inter-prediction unit 208 operates substantiallyidentically with the inter-prediction unit 103 of FIG. 1.

Based on the above description, an image decoding method and an imageencoding method according to an embodiment of the present invention willbe described.

The image encoding apparatus according to the present invention mayperform transform two times (primary transform and secondary transform)for a transform coefficient so as to improve energy concentration.Accordingly, the image decoding apparatus according to the presentinvention may perform inverse-transform two times (secondaryinverse-transform and primary inverse-transform). The same transformmethod may be used for primary transform and secondary transform, ordifferent transform methods may be used.

Transform and inverse-transform according to an embodiment of thepresent invention will be described with reference to FIGS. 3 and 4.

FIG. 3 is a view of a flowchart showing a transform method of an imageencoding apparatus according to the present invention.

Referring to FIG. 3, in S301, the image encoding apparatus may performprimary transform for a residue block in a transform block unit.Subsequently, in S302, the image encoding apparatus may performsecondary transform for transform coefficients of a transform block forwhich primary transform is performed. Secondary transform may beperformed for all or a partial area of the transform block for whichprimary transform is performed.

FIG. 4 is a view of a flowchart showing a transform method of an imagedecoding apparatus according to the present invention.

Referring to FIG. 4, the image decoding apparatus may perform secondaryinverse-transform for a dequantized block. Subsequently, the imagedecoding apparatus may perform primary inverse-transform for atransformed block for which secondary inverse is performed.

Hereinafter, a method of determining a transform performing area forwhich transform is performed will be described with reference to FIGS. 5to 10.

Herein, FIGS. 5 to 8 are views showing a method of determining atransform performing area on the basis of a prediction mode, and FIGS. 9and 10 are views showing a method of determining a transform performingarea on the basis of a frequency area of a transform block.

First, a method of determining a transform performing area on the basisof a prediction mode according to an embodiment of the present inventionwill be described.

FIG. 5 is a view of a flowchart showing a method of determining atransform performing area on the basis of an intra-prediction mode.

Referring to FIG. 5, in S501, whether or not an intra-prediction mode ofa prediction block in association with a current transform block is ahorizontal directional prediction mode is determined. Herein, thehorizontal directional prediction mode may mean at least oneintra-prediction mode performing intra-prediction by using a referencepixel of a left area of a prediction block. FIG. 6 is a view showing ahorizontal directional prediction mode according to an embodiment of thepresent invention.

Referring to FIG. 6, an H_(Above) mode may mean a prediction mode havingmaximum index information among intra-prediction modes belonging to ahorizontal directional prediction mode range, and an H_(Bottom) mode maymean a prediction mode having minimum index information among theintra-prediction modes belonging to the horizontal direction predictionrange. Accordingly, angular prediction modes between the H_(Above) modeand the H_(Bottom) mode may mean a horizontal directional predictionmode.

In S501, when the intra-prediction mode of the prediction block inassociation with the current transform block is a horizontal directionalprediction mode (S501—YES), S502 may be performed.

In S502, a secondary transform performing area may be determined as theleft area of the current transform block.

In S501, when the intra-prediction mode of the prediction block inassociation with the current transform block is not a horizontaldirectional prediction mode (S501—NO, S503 may be performed.

In S503, whether or not the intra-prediction mode of the predictionblock in association with the current transform block is a verticaldirectional prediction mode is determined. Herein, the verticaldirectional prediction mode may mean at least one intra-prediction modeperforming intra-prediction by using a reference pixel of an upper areaof the prediction block. FIG. 7 is a view showing a vertical directionalprediction mode according to an embodiment of the present invention.

Referring to FIG. 7, a V_(left) mode may mean a prediction mode havingminimum index information among intra-prediction modes belonging to avertical directional prediction mode range, and a V_(right) mode maymean a prediction mode having maximum index information among theintra-prediction modes belonging to the vertical direction predictionrange. Accordingly, angular prediction modes between the V_(left) modeand the V_(right) mode may mean a vertical directional prediction mode.

In S503, when the intra-prediction mode of the prediction block inassociation with the current transform block is a vertical directionalprediction mode (S503—YES), S504 may be performed.

In S504, the secondary transform performing area may be determined as anupper area within the current transform block.

In S503, when the intra-prediction mode of the prediction block inassociation with the current transform block is not a verticaldirectional prediction mode (S503—NO), S505 may be performed.

In S505, the secondary transform performing area may be determined as aleft upper area within the current transform block.

FIG. 8 is a view showing a left area, an upper area, and a left upperarea within a current transform block according to an embodiment of thepresent invention.

Referring to FIG. 8, when a secondary transform area is determined as aleft area within a current transform block as described in FIG. 5, theleft area may be a ¼ left area 801 or ½ left area 802 within a transformblock.

In addition, when a secondary transform area is determined as an upperarea within a current transform block, the upper area may be a ¼ upperarea 803 or ½ upper area 804 of the transform block.

In addition, when a secondary transform area is determined as a leftupper area within a current transform block, the left upper area may bea ¼ left upper area 805 or ½ left upper area 806 of the transform block.

In FIGS. 5 to 8, a case of performing secondary transform in the imageencoding apparatus has been described. However, it is not limitedthereto, and the image decoding apparatus may determine a secondaryinverse-transform performing area by using the same method describedabove.

Subsequently, a method of determining a method of determining atransform performing area on the basis of a frequency area of atransform block according to an embodiment of the present invention.

FIG. 9 is a view of a flowchart showing a method of determining a methodof determining a transform performing area on the basis of a frequencyarea of a transform block.

Referring to FIG. 9, in S901, a low frequency area within a transformblock may be determined on the basis of a transform base. Herein, thelow frequency area within the transform block may vary according to atransform base. Subsequently, in S902, a secondary transform performingarea may be determined as the low frequency area within the transformblock.

Meanwhile, a frequency range specifying the low frequency area may beidentically fixed in the image encoding apparatus and the image decodingapparatus. Alternatively, additional information may be transmitted fromthe image encoding apparatus to the image decoding apparatus so as todetermine a frequency range specifying a low frequency area.

FIG. 10 is a view showing an example of determining a transformperforming area on the basis of a frequency area of a transform block.

In the image encoding apparatus according to an embodiment of thepresent invention, a low frequency area of a transform block afterprimary transform may be a left upper area within the transform block.In addition, in the image decoding apparatus, a low frequency area of atransform block after dequantization may be a left upper area within atransform block. In FIG. 10, a secondary transform performing area isshown under the above assumption.

Referring to FIG. 10, in 1001, the image encoding apparatus/imagedecoding apparatus may determine a left upper 1/16 area of a transformblock as a low frequency area, and determine the corresponding area as asecondary transform performing area.

Alternatively, in 1002, the image encoding apparatus/image decodingapparatus transform block may determine a left upper ¼ area as a lowfrequency area, and determine the corresponding area as a secondarytransform performing area.

In FIGS. 5 to 10, a method of determining a transform performing areafor which secondary transform or secondary inverse-transform isperformed has been described, but it is not limited thereto. A transformperforming area for which primary transform or primary inverse-transformis performed may be determined by using the same method.

In addition, according to an embodiment, the entire transform block maybe determined as a transform performing area.

In addition, the image encoding apparatus and the image decodingapparatus may identically determine a secondary transform performingarea and a secondary inverse-transform performing area by using themethod described above, or information of a secondary transformperforming area determined by the method described above may be encodedin the image encoding apparatus and transmitted to the image decodingapparatus. Herein, the corresponding information may be transmitted inan upper layer level (video layer, sequence layer, picture layer, slicelayer, coding block layer, etc.) or in a transform block unit.

Hereinafter, a method of partitioning a primary transform performingarea or secondary transform performing area will be described withreference to FIGS. 11 to 15. Hereinafter, a transform block obtained bypartitioning an upper layer transform block is defined as a subtransform block.

FIGS. 11 and 12 are views showing a QT partition of a transform block.

FIG. 11 is a view of a flowchart showing a method of encoding optimizedQT partition information when performing QT partition for a transformblock into a sub transform block. Herein, the entire transform block maymean a transform block having an uppermost partition depth, a currentsub transform block may mean a sub transform block that is currentlyencoded, and a current partial block may mean a partial block that iscurrently encoded among partial blocks obtained by partitioning thecurrent sub transform block.

Referring to FIG. 11, in S1101, the entire transform block may be set asa current sub transform block.

Subsequently, in S1102, QT partition information in the current subtransform block may be encoded.

Subsequently, in S1103, whether QT partition information that has beenalready encoded in the current sub transform block is TRUE or FALSE maybe determined.

When the QT partition information encoded in the current sub transformblock is FALSE (S1103—NO), QT partition encoding may be ended.

On the contrary, when the QT partition information encoded in thecurrent sub transform block is TRUE (S1103—YES), S1104 may be performed.

In S1104, a partial block may be generated by performing a QT partitionfor the current sub transform block.

Subsequently, in S1105, QT partition information of the partial blockthat is currently encoded (hereinafter, referred as current partialblock) may be encoded in an encoding order of partial blocks obtained bypartitioning the current sub transform block.

Subsequently, in S1106, whether or not the current partial block is apartial block corresponding to the last encoding order within thecurrent sub transform block may be determined.

When the current partial block is the partial block corresponding to thelast encoding order within the current sub transform block (S1106—YES),S1109 may be performed.

In S1109, whether or not the current partial block is a partial blockcorresponding to the last encoding order within the entire transformblock may be determined.

When the current partial block is the partial block corresponding to thelast encoding order within the entire transform block (S1109—YES), QTpartition encoding may be ended.

On the contrary, when the current partial block is not the partial blockcorresponding to the last encoding order within the entire transformblock (S1109—NO), in S1110, the current sub transform block is set as acurrent partial block having an upper layer depth, and encoding of QTpartition information of a partial block having the following encodingorder of the current partial block having the upper layer depth isperformed by returning to S1105.

In S1107, when the current partial block is not the partial blockcorresponding to the last encoding order within the current subtransform block in S1106 (S1106—NO), whether QT partition information ofthe corresponding partial block is TRUE or FALSE may be determined.Herein, when the corresponding information is FALSE (S1107—NO), encodingof QT partition information of a partial block having the followingencoding order of the current partial block may be performed byreturning to S1105.

On the contrary, when the corresponding information is TRUE (S1107—YES),in S1108, the current partial block is set as a current sub transformblock having a lower layer depth, and retuning to S1104 may beperformed.

Meanwhile, a maximum/minimum size of a transform block for which a QTpartition is available, a maximum depth for which a QT partition isavailable, a depth for which partition is available in a currenttransform block, etc. may be identically fixed in the image encodingapparatus and the image decoding apparatus, or the same may betransmitted form the image encoding apparatus to the image decodingapparatus through an upper layer header (slice layer, picture layer,sequence layer, vide layer, etc.).

FIG. 12 is a view of a flowchart showing a method of performing a QTpartition for a transform block into a sub transform block by decodingQT partition information.

Referring to FIG. 12, in S1201, the entire transform block may be set asa current sub transform block.

Subsequently, in S1202, QT partition information in the current subtransform block may be decoded.

Subsequently, in S1203, whether or not the QT partition informationdecoded in the current sub transform block is TRUE or FALSE may bedetermined.

When the QT partition information decoded in the current sub transformblock is FALSE (S1203—NO), QT partition decoding may be ended.

On the contrary, when the QT partition information decoded in thecurrent sub transform block is TRUE (S1203—YES), S1204 may be performed.

In S1204, four partial blocks may be generated by performing a QTpartition for the current sub transform block.

Subsequently, in S1205, QT partition information of a partial block thatis currently decoded (hereinafter, referred as current partial block)may be decoded in a decoding order of partial blocks obtained bypartitioning the current sub transform block.

Subsequently, in S1206, whether or not the current partial block is apartial block corresponding to the last decoding order within thecurrent sub transform block may be determined.

When the current partial block is the partial block corresponding to thelast decoding order within the current sub transform block (S1206—YES),S1209 may be performed.

In S1209, whether or not the current partial block is a partial blockcorresponding to the last decoding order within the entire transformblock may be determined.

When the current partial block is the partial block corresponding to thelast decoding order within the entire transform block (S1209—YES), QTpartition decoding may be ended.

On the contrary, when the current partial block is not the partial blockcorresponding to the last decoding order within the entire transformblock current partial (S1209—NO), in S1210, the current sub transformblock may be set as a current partial block having an upper layer depth,and decoding of QT partition information of a partial block having thefollowing decoding order of the current partial block having the upperlayer depth may be performed by returning to S1205.

In S1207, when the current partial block is not the partial blockcorresponding to the last decoding order within the current subtransform block in S1206 (S1206—NO), whether or not QT partitioninformation of the corresponding partial block is TRUE or FALSE may bedetermined. Herein, when the corresponding information is FALSE(S1207—NO), decoding of QT partition information of a partial block ofthe following decoding order of the current partial block may be decodedby returning to S1205.

On the contrary, when the corresponding information is TRUE (S1207—YES),in S1208, the current partial block may be set as a current subtransform block having a lower layer depth, and returning to S1204 maybe performed.

FIGS. 13 and 14 are views showing a BT partition of a transform block.

In FIGS. 13 and 14, the rest of the process is the same with examples ofFIGS. 11 and 12 except that a QT partition is changed to a BT partitionand QT partition information is changed to BT partition information.Accordingly, description of FIGS. 13 and 14 will be omitted.

FIG. 15 is a view showing an example where a transform performing areais partitioned into a partial transform block by using QT partition andBT partition. Herein, the transform performing area may mean the entiretransform block. In FIG. 15, the transform performing area is assumed tobe a left upper of a current block.

Referring to FIG. 15, 1501 shows a shape of a partial transform blockobtained by performing a QT partition method for the entire transformblock, and 1502 shows a shape of a partial transform block obtained byperforming a BT partition method for the entire transform block. Inaddition, 1503 shows a shape of a partial transform block obtained byperforming a QT partition method and a BT partition method for theentire transform block.

Meanwhile, the image encoding apparatus and the image decoding apparatusmay determine a partition shape of a transform block on the basis of asize of the entire transform block within a transform performing area.

In an example, when both of horizontal and vertical lengths of theentire transform block are equal to or greater than 8, transform may beperform for a left upper 8×8 sub transform block, otherwise, transformmay be perform for a left upper 4×4 sub transform block.

According to the above embodiment, a shape of a sub transform blockpartition within a transform performing area may be determined, andtransform or inverse-transform may be performed in a sub transform blockunit. Hereinafter, a coefficient scan method and a resorting methodwhich are possibly performed after or before performing secondarytransform within a secondary transform performing area in a subtransform block unit will be described. Herein, the secondary transformperforming area and secondary transform may be a concept including asecondary inverse-transform performing area and secondaryinverse-transform.

FIG. 16 is a view showing an example of a scanning method and aresorting method of a 2D sub transform block when converting a 2D subtransform block to a 1D sub transform block to perform a 1D transformmethod rather than a 2D transform method.

Referring to FIG. 16, 1601 shows a method of resorting a 2D subtransform block, for which primary transform is performed beforeperforming secondary transform, to a 1D sub transform block by scanningthe same in a vertical direction. Herein, a vertical directional scanorder may be C00, C10, C20, C01, . . . , C23, and C33, and mapping to a1D sub transform block may be performed in the same order.

1602 shows a method of resorting a 2D sub transform block, for whichprimary transform is performed before performing secondary transform, toa 1D sub transform block by scanning the same in a horizontal direction.Herein, a horizontal directional scan order may be C00, C01, C02, C03,C10, . . . , C32, and C33, and mapping to a 1D sub transform block maybe performed in the same order.

1603 show a method of resorting a 2D sub transform block, for whichprimary transform is performed before performing secondary transform, toa 1D sub transform block by scanning in a 45-degree diagonal direction.Herein, a 45-degree diagonal directional scan order may be C00, C10,C01, C20, C11, . . . , C23, and C33, and mapping to a 1D sub transformblock may be performed in the same order.

FIG. 17 is a view showing an example of a scan method and a resortingmethod of a 2D sub transform block.

Referring to FIG. 17, 1701 show a method of resorting a 2D sub transformblock, for which secondary transform is performed, to a 2D sub transformblock by scanning the same in a vertical direction after performingsecondary transform. Herein, a vertical directional scan order may beC00, C10, C20, C01, . . . , C23, and C33, and mapping to a 2D subtransform block may be performed in the same order.

1702 shows a method of resorting a 2D sub transform block, for whichsecondary transform is performed, to a 2D sub transform block byscanning the same in a horizontal direction after performing secondarytransform. Herein, a horizontal directional scan order may be C00, C01,C02, C03, C10, . . . , C32, and C33, and mapping to a 2D sub transformblock may be performed in the same order.

1703 shows a method of resorting a 2D sub transform block, for whichsecondary transform is performed, to a 2D sub transform block byscanning the same in a 45-degree diagonal direction after performingsecondary transform. Herein, a 45-degree diagonal directional scan ordermay be C00, C10, C01, C20, C11, . . . , C23, and C33, and mapping to a2D sub transform block may be performed in the same order.

Meanwhile, a method shown in FIG. 17 may be performed before performingsecondary transform.

In addition, as a scan method of FIGS. 16 and 17, various directionalscan methods may be used other than a vertical direction, a horizontaldirection, and a 45-degree diagonal direction. In addition, in FIGS. 16and 17, secondary transform or secondary inverse-transform is used as anexample, but the above method may be applied to a case of primarytransform and primary inverse-transform.

Hereinafter, a method of determining a coefficient scan method for a subtransform block described above will be described.

According to an embodiment of the present invention, in a coefficientscan method of a sub transform block, and a scan method may be variablyperformed in a sub transform block unit according to a prediction mode.

FIG. 18 is a view of a flowchart showing a method of determining a scanmethod for a sub transform block according to a prediction modeperformed when generating a current transform block.

Referring to FIG. 18, in S1801, whether or not a prediction modeperformed for generating a current transform block is one of horizontaldirectional prediction mode among intra-prediction modes may bedetermined.

Subsequently, in S1802, when the result of S1801 is TRUE, a scan methodfor a sub transform block may be determined as a vertical directionalscan method.

Subsequently, in S1803, when the result of S1801 is FALSE, whether ornot the prediction mode performed when generating the current transformblock is one of vertical directional prediction modes amongintra-prediction modes may be determined.

Subsequently, in S1804, when the result of S1803 is TRUE, a scan methodfor a sub transform block may be determined as a horizontal directionalscan method.

Subsequently, in S1805, when the result of S1803 is FALSE, a scan methodfor a sub transform block may be determined as a 45-degree diagonaldirectional scan method. In other words, in S1805, when the predictionmode performed for generating the current transform block does notbelong to vertical directional prediction modes, nor horizontaldirectional prediction modes of intra-prediction modes, a scan methodfor a sub transform block may be determined as a 45-degree diagonaldirectional scan method.

According to another embodiment of the present invention, in acoefficient scan method for a sub transform block, a scan method may bedifferently performed in a sub transform block unit according to atransform base.

FIG. 19 is a view showing a method of determining a scan method for asub transform block according to a transform base.

Referring to FIG. 19, a 45-degree diagonal directional scan method maybe determined for a left upper sub transform block, and a verticaldirection scan method may be determined for remaining sub transformblocks as a sub transform block scan method.

The image encoding apparatus may determine an optimized scan method foreach sub transform block through RDO, and transmit the optimized scanmethod to the image decoding apparatus by encoding the same.

FIG. 20 is a view of a flowchart showing an image decoding methodaccording to an embodiment of the present invention.

Referring to FIG. 20, in S2001, the image decoding apparatus maydetermine a transform performing area.

Herein, the image decoding apparatus may determine the transformperforming area on the basis of an intra-prediction mode of a currentprediction block in association with a current transform block. Indetail, the image decoding apparatus may determine a left area of thecurrent transform block as the transform performing area when theintra-prediction mode of the current prediction block is a horizontaldirectional prediction mode, and determine an upper area of the currenttransform block as the transform performing area when theintra-prediction mode of the current prediction block is a verticaldirectional prediction mode. When the intra-prediction mode of thecurrent prediction block is not a horizontal directional prediction modenor vertical directional prediction mode, the image decoding apparatusmay determine a left upper area of the current transform block as thetransform performing area.

Meanwhile, the image decoding apparatus may determine the transformperforming area on the basis of a specific frequency area of the currenttransform block. Herein, the specific frequency area may be determinedon the basis of a predefined value.

In S2002, the image decoding apparatus may perform partition for thedetermined transform performing area into at least one sub transformblock by using at least one of a QT partition and a BT partition.

Subsequently, in S2003, the image decoding apparatus may performinverse-transform for the at least one sub transform block. Herein,inverse-transform may be any one of primary inverse-transform andsecondary inverse-transform.

Meanwhile, the at least one sub transform block may be a 2D subtransform block. Herein, the image decoding apparatus may furtherperform: determining a coefficient scan method of the sub transformblock; and resorting the 2D sub transform block on the basis of thedetermined coefficient scan method.

Herein, the image decoding apparatus may determine the coefficient scanmethod of the sub transform block on the basis of an intra-predictionmode of the current prediction block in association with the currenttransform block.

The image decoding method of FIG. 20 may be identically performed in theimage encoding apparatus as an image encoding method. Herein,inverse-transform may be changed to transform.

In the above-described embodiments, the methods are described based onthe flowcharts with a series of steps or units, but the presentinvention is not limited to the order of the steps, and rather, somesteps may be performed simultaneously or in different order with othersteps. In addition, it should be appreciated by one of ordinary skill inthe art that the steps in the flowcharts do not exclude each other andthat other steps may be added to the flowcharts or some of the steps maybe deleted from the flowcharts without influencing the scope of thepresent invention.

The embodiments include various aspects of examples. All possiblecombinations for various aspects may not be described, but those skilledin the art will be able to recognize different combinations.Accordingly, the present invention may include all replacements,modifications, and changes within the scope of the claims.

In addition, the embodiments of the present invention may be achieved byvarious means, for example, hardware, firmware, software, or acombination thereof. In a hardware configuration, an embodiment of thepresent invention may be achieved by one or more application specificintegrated circuits (ASICs), digital signal processors (DSPs), digitalsignal processing devices (DSDPs), programmable logic devices (PLDs),field programmable gate arrays (FPGAs), processors, controllers,microcontrollers, microprocessors, etc.

The range of the present invention includes software ormachine-executable instructions (for example, operating system,application, firmware, program, etc.) so that operation according tovarious embodiments are executed in an apparatus or computer, and anon-transitory computer-readable medium storing such software orinstructions so as to be executable in an apparatus or computer.

INDUSTRIAL APPLICABILITY

The present invention may be used for an image encoding/decidingapparatus.

1. A method of decoding an image, the method comprising: determining atransform performing; partitioning the determined transform performingarea into at least one sub transform block by using at least one of a QTpartition and a BT partition; and performing inverse-transform for theat least one sub transform block.
 2. The method of claim 1, wherein inthe determining of the transform performing area, the transformperforming area is determined on the basis of an intra-prediction modeof a current prediction block in association with a current transformblock.
 3. The method of claim 2, wherein in the determining of thetransform performing area, when the intra-prediction mode of the currentprediction block is a horizontal directional prediction mode, a leftarea of the current transform block is determined as the transformperforming area, when the intra-prediction mode of the currentprediction block is a vertical directional prediction mode, an upperarea of the current transform block is determined as the transformperforming area, and when the intra-prediction mode of the currentprediction block is not a horizontal directional prediction mode, nor avertical directional prediction mode, a left upper area of the currenttransform block is determined as the transform performing area.
 4. Themethod of claim 1, wherein in the determining of the transformperforming area, the transform performing area is determined on thebasis of a specific frequency area of a current transform block.
 5. Themethod of claim 4, wherein the specific frequency area is determined onthe basis of a predefined value.
 6. The method of claim 1, wherein theinverse-transform is any one of primary inverse-transform and secondaryinverse-transform.
 7. The method of claim 1, wherein the at least onesub transform block is a 2D sub transform block.
 8. The method of claim7, further including: determining a coefficient scan method of the subtransform block; and resorting the 2D sub transform block on the basisof the determined coefficient scan method.
 9. The method of claim 8,wherein in the determining of the coefficient scan method of the subtransform block, the coefficient scan method of the sub transform blockis determined on the basis of at least one of an intra-prediction modeof a current prediction block in association with a current transformblock, and a transform base of the current transform block.
 10. Themethod of claim 8, wherein in the determining of the coefficient scanmethod of the sub transform block, any one of a vertical directionalscan, a horizontal directional scan, and a 45-degree diagonaldirectional scan is determined as the coefficient scan method.
 11. Themethod of claim 8, wherein in the resorting of the 2D sub transformblock on the basis of the determined coefficient scan method, the 2D subtransform block is resorted to a 1D sub transform block on the basis ofthe determined coefficient scan method.
 12. An image encoding method,the method comprising: determining a transform performing area;partitioning the determined transform performing area into at least onesub transform block by using at least one of a QT partition and a BTpartition; and performing transform for the at least one sub transformblock.
 13. The method of claim 12, wherein in the determining of thetransform performing area, the transform performing area is determinedon the basis of an intra-prediction mode of a current prediction blockin association with a current transform block.
 14. The method of claim13, wherein in the determining of the transform performing area, whenthe intra-prediction mode of the current prediction block is ahorizontal directional prediction mode, a left area of the currenttransform block is determined as the transform performing area, when theintra-prediction mode of the current prediction block is a verticaldirectional prediction mode, an upper area of the current transformblock is determined as the transform performing area, and when theintra-prediction mode of the current prediction block is not ahorizontal directional prediction mode, nor a vertical directionalprediction mode, a left upper area of the current transform block isdetermined as the transform performing area.
 15. The method of claim 12,wherein in the determining of the transform performing area, thetransform performing area is determined on the basis of a specificfrequency area of a current transform block.
 16. The method of claim 15,wherein the specific frequency area is determined on the basis of apredefined value.
 17. The method of claim 12, wherein the transform isany one of primary transform and secondary transform.
 18. The method ofclaim 12, wherein the at least one sub transform block is a 2D subtransform block.
 19. The method of claim 18, further comprising:determining a coefficient scan method of the sub transform block; andresorting the 2D sub transform block on the basis of the determinedcoefficient scan method.
 20. The method of claim 19, wherein in thedetermining of the coefficient scan method of the sub transform block,the coefficient scan method of the sub transform block is determined onthe basis of at least one of an intra-prediction mode of a currentprediction block in association with a current transform block, and atransform base of the current transform block.
 21. The method of claim19, wherein in the determining of the coefficient scan method of the subtransform block, any one of a vertical directional scan, a horizontaldirectional scan, and a 45-degree diagonal directional scan isdetermined as the coefficient scan method.
 22. The method of claim 19,wherein in the resorting of the 2D sub transform block on the basis ofthe determined coefficient scan method, the 2D sub transform block isresorted to a 1D sub transform block on the basis of the determinedcoefficient scan method.
 23. A computer readable recording mediumstoring a bitstream, wherein the bitstream is generated by an imageencoding method, the method including: determining a transformperforming area; partitioning the determined transform performing areainto at least one sub transform block by using at least one of a QTpartition and a BT partition; and performing transform for the at leastone sub transform block.